package com.fangzhi.mobel.vo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fangzhi.utils.GlobalParam;
import lombok.Data;
import lombok.experimental.Accessors;

import java.io.Serializable;

@Data
@Accessors(chain = true)
public class ProductListByIdVo implements Serializable {
    /**
     *
     */
    private Long id;

    /**
     * 分类名称
     */
    private String productName;

    /**
     * 上级id
     */
    private Long parentId;


    private String parentName;
    /**
     * 图片
     */
    private String imageCover;

    /**
     * 单价
     */
    private Double price;

    /**
     * 备注
     */
    private String comments;

    private Integer level;

    /**
     * 最小采购件数  0：无限制
     */
    private Integer procureCount;

//    public ProductListByIdVo setImageCover(String imageCover) {
//        if (imageCover != null)
//            this.imageCover = GlobalParam.IMAGE_URL + imageCover;
//        return this;
//    }

    public ProductListByIdVo setPrice(Integer price) {
        this.price = price / 100D;
        return this;
    }
}
